package com.example.demo.repository;

import com.example.demo.entity1.Perm;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 角色dao层
 * Created by Administrator on 2017/11/9.
 */
@Transactional
@Repository("PermRepository")
public interface PermRepository extends CrudRepository<Perm, Long > {

    @Query("select t from Perm t where t.permName=:permName")
    List<Perm> findPermByName(@Param("permName") String permName);
}
